#include <iostream>
using std::cout;
using std::endl;

template <class T1, class T2>
T1 add(T1 t1, T2 t2)
{
    return t1 + t2;
}


//普通函数与函数模板重载时
//普通函数的优先级更高，因为更直接，效率也更高
short add(short s1, short s2){
    cout << "add(short,short)" << endl;
    return s1 + s2;
}

void test0(){
    short s1 = 1, s2 = 2;
    cout << add(s1,s2) << endl;   //调用普通函数
    cout << add<short>(s1,s2) << endl;   //调用函数模板

}

int main(void){
    test0();
    return 0;
}
